define(['common/js/service/boss-common-service-0.1'],
    function () {

        serviceModule.factory("SelectCommonOptionService", function ($window, $http, $q, CommonRestService) {
            return {
                projectList: function (requestParams) {
                    if (true === requestParams || !requestParams) {
                        requestParams = {};
                    }
                    return CommonRestService.queryResponseEntity("/rest/project/projectList", requestParams);
                },
                queryEvents: function (projectId) {
                    return CommonRestService.queryResponseEntity("/rest/project/queryEvents", {projectId: projectId});
                },
                queryEventsByIdText: function (projectIdText) {
                    return CommonRestService.queryResponseEntity("/rest/project/queryEvents", {projectId: projectIdText.id});
                },
                findEventById: function (eventId) {
                    return CommonRestService.queryResponseEntity("/rest/project/getEvent", {eventId: eventId});
                },
                getPriceList: function (eventId) {
                    if(typeof eventId!='string'||eventId.length<=0){
                        eventId="";
                    }
                    return CommonRestService.queryResponseEntity("/rest/project/getPriceList", {eventId: eventId});
                },
                getFloorList: function (eventId) {
                    if (typeof eventId != 'string' || eventId.length <= 0) {
                        eventId = "";
                    }
                    return CommonRestService.queryResponseEntity("/rest/project/getFloorList", {eventId: eventId});
                },
                getBoundList: function (floorId) {
                    if (typeof floorId != 'string' || floorId.length <= 0) {
                        floorId = "";
                    }
                    return CommonRestService.queryResponseEntity("/rest/project/getBoundList", {floorId: floorId});
                },
                loadFloorSeat: function (eventId) {
                    return CommonRestService.queryResponseEntity("/rest/project/loadFloorSeat", {eventId: eventId});

                }
            };
        });
    });